package com.gang.utils;

public class UserDataUtil {
    public static String getUserData(int index,String userdata){
        int count=0;
        int i;
        int j;
        for(i=0;i<userdata.length();i++){
            if(userdata.charAt(i)==',')
                count++;
        }
        for (j=0;j<count-index+1;j++)
        {
            userdata=userdata.substring(0,userdata.lastIndexOf(','));
        }
        for (int m=count-j;m>0;m--){
            userdata=userdata.substring(userdata.indexOf(',')+1,userdata.length());
        }
       return userdata;
    }

}
